// EDLifeTime.cpp : implementation file
//

#include "stdafx.h"
#include "resourcemake.h"
#include "EDLifeTime.h"
#include "resourcemakeDlg.h"
#include "DSyncDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// EDLifeTime dialog


EDLifeTime::EDLifeTime(CWnd* pParent /*=NULL*/)
: CDialog(EDLifeTime::IDD, pParent)
{
	//{{AFX_DATA_INIT(EDLifeTime)
	// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void EDLifeTime::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(EDLifeTime)
	// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(EDLifeTime, CDialog)
//{{AFX_MSG_MAP(EDLifeTime)
ON_WM_SHOWWINDOW()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// EDLifeTime message handlers

void EDLifeTime::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	CString tmpstr="10";
	((CEdit *)(this->GetDlgItem(IDC_EDT_IPTIME)))->SetWindowText(tmpstr);
	
	//
	// TODO: Add your message handler code here
	
}

void EDLifeTime::OnOK() 
{
	// TODO: Add extra validation here
	CString tmpstr;
	((CEdit *)(this->GetDlgItem(IDC_EDT_IPTIME)))->GetWindowText(tmpstr);
//		((CResourcemakeDlg *)AfxGetApp()->m_pMainWnd)->m_udcb->saveCurrScene();
//	((CResourcemakeDlg *)AfxGetApp()->m_pMainWnd)->m_udcb->saveCurrLogic(3);
    ((DSyncDlg *)(((CResourcemakeDlg *)AfxGetApp()->m_pMainWnd)->m_dsd))->addSyncST(tmpstr+"00");
	//m_dsd->addSyncST(tmpstr);

	CDialog::OnOK();
}
